﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class masterPages_spend_AddNewSpendItem : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void AddImageButton_Click(object sender, ImageClickEventArgs e)
    {
        SpendItemDetail si = new SpendItemDetail();
        si.SpendItemName = SpendItemNameTextBox.Text;
        si.SpendItemPrice = double.Parse(ItemPriceTextBox.Text);
        si.SpendTypeId = long.Parse(SpendTypeDropDownList.SelectedValue);
        PoseidonDBHelper.UserDB.Insert(si);

        this.Response.Redirect("~/masterPages/spend/SpendList.aspx");
    }
}